<?php
// 连接数据库
$link=mysql_connect(SAE_MYSQL_HOST_M.':'.SAE_MYSQL_PORT,SAE_MYSQL_USER,SAE_MYSQL_PASS);
//sql语句
$sql="INSERT INTO test (t_id, firstname, lastname) VALUES ('$_POST[tid]','$_POST[firstname]','$_POST[lastname]')";
//如果连接成功
if($link)
{
    mysql_select_db(SAE_MYSQL_DB,$link);
}else{
    die('Could not connect: ' . mysql_error());
};
if(!mysql_query($sql,$link)){
    die('Could not connect: ' . mysql_error());
}
echo 'success!yes';
mysql_close($link);
?>